package com.nari.interplatform.utils.webservice;

public class ExtsServicePortTypeProxy implements com.nari.interplatform.utils.webservice.ExtsServicePortType {
  private String _endpoint = null;
  private com.nari.interplatform.utils.webservice.ExtsServicePortType extsServicePortType = null;
  
  public ExtsServicePortTypeProxy() {
    _initExtsServicePortTypeProxy();
  }
  
  public ExtsServicePortTypeProxy(String endpoint) {
    _endpoint = endpoint;
    _initExtsServicePortTypeProxy();
  }
  
  private void _initExtsServicePortTypeProxy() {
    try {
      extsServicePortType = (new com.nari.interplatform.utils.webservice.ExtsServiceLocator()).getextsServiceHttpPort();
      if (extsServicePortType != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)extsServicePortType)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)extsServicePortType)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (extsServicePortType != null)
      ((javax.xml.rpc.Stub)extsServicePortType)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public com.nari.interplatform.utils.webservice.ExtsServicePortType getExtsServicePortType() {
    if (extsServicePortType == null)
      _initExtsServicePortTypeProxy();
    return extsServicePortType;
  }
  
  public String doService(String request) throws java.rmi.RemoteException{
    if (extsServicePortType == null)
      _initExtsServicePortTypeProxy();
    return extsServicePortType.doService(request);
  }
  
  
}